<template>
	<view>
		<text class="zy-btn" @click="onClick" v-if="size=='normal' || size=='sm'"
			:class="{'normal': size== 'normal', 'sm': size== 'sm', 'hollow':hollow}">
			{{content}}
		</text>
		
		<view class="zy-btn full" @click="onClick" v-if="size=='full'"
		:class="{'hollow':hollow}">
		{{content}} </view>
	</view>
</template>

<script lang="ts" setup>
	const emit = defineEmits(['click'])
	
	const props = defineProps({
		//文本
		content: {
			type: String,
		},
		//full normal sm  小----根据字体大小 + padding---控制按钮大小
		size: {
			type: String,
			default () {
				return 'full'
			}
		},
		// 镂空
		hollow: {
			type: Boolean,
			default () {
				return false
			}
		}
	})
	
	const onClick = ()=>{
		emit('click')
	}
</script>

<style lang="scss" scoped>
	.zy-btn {
		background: linear-gradient(to right, #06EBD8, #14B9D9);
		color: #fff;
		text-align: center;
		border-radius: 50rpx;
	}

	.hollow {
		border: 2rpx solid #1ECBDA;
		color:#1ECBDA;
		background: rgba(#fff, 0);
	}

	.full {
		font-size: 32rpx;
		height: 88rpx;
		line-height: 88rpx;
		width: 100%;
		font-weight: $zy-font-bold;
	}

	.sm {
		font-size: 20rpx;
		padding: 8rpx 15rpx;
		border-radius: 30rpx;
	}

	.normal {
		font-size: 32rpx;
		padding: 15rpx 45rpx;
		font-weight: $zy-font-bold;
	}
</style>